package com.zhanghu.backendZray.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhanghu.backendZray.pojo.entity.Accounting;
import com.zhanghu.backendZray.pojo.request.accounting.AccountingQueryRequest;
import com.zhanghu.backendZray.pojo.request.accounting.AccountingRequest;
import com.zhanghu.backendZray.pojo.vo.accounting.AccountingSummaryVo;
import com.zhanghu.backendZray.pojo.vo.accounting.AccountingVo;

import java.util.List;

/**
 * <p>
 * 记账 服务类
 * </p>
 *
 * @author zhangdong
 * @since 2024-12-19
 */
public interface AccountingService extends IService<Accounting> {

    /**
     * 新增/修改
     */
    void saveAccounting(AccountingRequest request);

    /**
     * 按年月查询
     */
    List<AccountingVo> listByYearMonth(AccountingQueryRequest pageRequest);

    /**
     * 删除
     */
    void delete(Integer id);

    /**
     * 年度汇总
     *
     * @param request
     * @return
     */
    AccountingSummaryVo yearSummary(AccountingQueryRequest request);

    /**
     * 月度汇总
     *
     * @param request
     * @return
     */
    AccountingSummaryVo monthSummary(AccountingQueryRequest request);
}
